package com.example.fileserver_API.Controller.Analysis;

import com.example.fileserver_API.Entity.VO.APIResult;
import com.example.fileserver_API.Interfaces.IService.IAnalysisSSService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("/API/Analysis")
public class AnalysisController {

    @Resource
    IAnalysisSSService iAnalysisSSService;

    /**
     * 解析MD文件返回html格式
     * @param file 文件
     * @return
     */
    @PostMapping("/UploadMDFile")
    public APIResult UploadMDFile(@RequestParam("file") MultipartFile file) {
        return iAnalysisSSService.UploadMDFile(file);
    }
}